package com.easytopit.demo.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserDao {
	
	@Select({"select name from user where name = #{name,jdbcType=VARCHAR}"})
	String checkName(@Param("name")String name);
	
	@Insert({"insert into user (name,passwd,phone) "
		+ "values (#{name,jdbcType=VARCHAR},#{passwd,jdbcType=VARCHAR},#{phone,jdbcType=VARCHAR})"})
	void insert(@Param("name")String name,@Param("passwd")String passwd,@Param("phone")String phone);
}